//
//
//  Generated by StarUML(tm) C++ Add-In
//
//  @ Project : OOAD5T
//  @ File Name : Timer.cpp
//  @ Date : 2026-05-03
//  @ Author : 
//
//


#include "Timer.h"

Timer::Timer() {
}

Timer::~Timer() {

}

void Timer::setTimer(int time, ReturnCallback returnCallback) {

    Expire_Time = time;
    rc = returnCallback;
}

void Timer::syncTimerDigitalClock() {   //인터럽트
    if (Expire_Time == 0) return;

    Expire_Time--;
    if (Expire_Time == 0) {
        if (rc) {
            rc();   //restore 진행
        }
    }
}

int Timer::getExpire_Time()
{
    return Expire_Time;
}